package org.orion.engine;


public class Texture {
	private int id;
	private int width;
	private int height;
	private int type; 
	
	public static void glEnable(int type){
		GLStatic.gl.glEnable(type);
	}
	
	public static void glDisable(int type){
		GLStatic.gl.glDisable(type);
	}
	
	public Texture(int type){
		int[] ids = new int[1];
		GLStatic.gl.glGenTextures(1, ids, 0);
		this.id = ids[0];
		this.type = type;
	}
	
	public Texture(int type,int width, int height){
		int[] ids = new int[1];
		GLStatic.gl.glGenTextures(1, ids, 0);
		this.id = ids[0];
		this.type = type;
		this.width = width;
		this.height = height;
	}
	
	public void glBind(){
		GLStatic.gl.glBindTexture(type, id);
	}
	
	public int getHeight() {
		return height;
	}

	public void setHeight(int height) {
		this.height = height;
	}

	public int getWidth() {
		return width;
	}

	public void setWidth(int width) {
		this.width = width;
	}

	public int getId() {
		return id;
	}

	public int getType() {
		return type;
	}

	protected void setId(int id) {
		this.id = id;
	}
}
